import requests
from config import url,headers_web,headers_wechat

class PeerReview:
    def __int__(self):
        self.url = url
        self.headers = headers_web,headers_wechat

    @classmethod
    def post_peerreviewlist(cls,url:str,headers=headers_web,params=None,json=None,paramspath=None):
        '''
        summary:获取老师班级学生发起的同伴互评列表
        description:1.云课堂老师端-获取老师班级学生发起的同伴互评列表使用
        :param url:
        :param headers:
        :param params:
        :param json:
        :param paramspath
        :return:
        '''
        url = url + f"/teachingApi/v1/teacher/{paramspath}/peerreview/page"
        r = requests.post(url=url,params=params,json=json,headers=headers)
        return r

    @classmethod
    def post_peerreviewprocount(cls, url: str, headers=headers_web, params=None, json=None):
        '''
        summary:老师端获取同伴互评项目评价统计
        description:云课堂老师端-获取同伴互评评价项目统计
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url + "/teachingApi/v1/teacher/peerreview/statistics/project"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_post_primaryindexcontent(cls, url: str, headers=headers_web, params=None, json=None):
        '''
        summary:老师端获取同伴互评项目指标内容评价统计
        description:云课堂老师端-获取同伴互评评价项目指标内容统计
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url + "/teachingApi/v1/teacher/peerreview/statistics/primaryindex/content"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_primaryindex(cls, url: str, headers=headers_web, params=None, json=None):
        '''
        summary:老师端获取同伴互评项目一级指标评价统计
        description:云课堂老师端-获取同伴互评评价项目一级指标统计
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url + "/teachingApi/v1/teacher/peerreview/statistics/primaryindex/content"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_participant(cls, url: str, headers=headers_web, params=None, json=None):
        '''
        summary:老师端获取同伴互评评价列表
        description:云课堂老师端-获取同伴互评评价详情
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url + "/teachingApi/v1/teacher/peerreview/participant"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_evaluation_statistics(cls, url: str, headers=headers_web, params=None, json=None):
        '''
        summary:老师端获取同伴互评评价统计详情
        description:云课堂老师端-获取同伴互评评价统计详情
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url + "/teachingApi/v1/teacher/peerreview/evaluation/statistics"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_peerreviewpage(cls, url: str, headers=headers_web, params=None, json=None,paramspath=None):
        '''
        summary:获取学生发起的同伴互评列表
        description:1.云课堂学生端-获取学生发起的同伴互评列表使用
        :param url:
        :param headers:
        :param params:
        :param paramspath
        :param json:
        :return:
        '''
        url = url + f"/teachingApi/v1/student/{paramspath}/peerreview/page"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_peerreviewstatus(cls, url: str, headers=headers_wechat, params=None, json=None, paramspath=None):
        '''
        summary:修改同伴互评活动状态
        description:1.小程序学生端-修改同伴互评状态接口
        :param url:
        :param headers:
        :param params:
        :param paramspath
        :param json:
        :return:
        '''
        url = url + f"/teachingApi/v1/peerreview/{paramspath}/status"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_peerreviewqrcode(cls, url: str, headers=headers_wechat, params=None, json=None, paramspath=None):
        '''
        summary:生成同伴互评二维码
        description:1.小程序学生端-同伴互评使用
        :param url:
        :param headers:
        :param params:
        :param paramspath
        :param json:
        :return:
        '''
        url = url + f"/teachingApi/v1/peerreview/{paramspath}/qrcode"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_peerreviewevaluation(cls, url: str, headers=headers_wechat, params=None, json=None, paramspath=None):
        '''
        summary:学生提交同伴互评评价信息
        description:1.小程序学生端-提交同伴互评评价信息
        :param url:
        :param headers:
        :param params:
        :param paramspath
        :param json:
        :return:
        '''
        url = url + f"/teachingApi/v1/peerreview/{paramspath}/evaluation"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def post_peerreview(cls, url: str, headers=headers_wechat, params=None, json=None):
        '''
        summary:创建同伴互评活动
        description:1.小程序学生端-发起同伴互评使用
        :param url:
        :param headers:
        :param params:
        :param json:
        :return:
        '''
        url = url + "/teachingApi/v1/peerreview"
        r = requests.post(url=url, params=params, json=json, headers=headers)
        return r

    @classmethod
    def get_peerreviewongoing(cls, url: str, headers=headers_wechat, params=None,paramspath=None):
        '''
        summary:获取学生有无正在进行中的同伴互评信息
        description:1.小程序学生端-发起同伴互评使用
        :param url:
        :param headers:
        :param params:
        :param paramspath
        :return:
        '''
        url = url + f"/teachingApi/v1/student/{paramspath}/peerreview/ongoing"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def get_courseandproject(cls, url: str, headers=headers_web, params=None, paramspath=None):
        '''
        summary:获取学生同伴互评的课程与项目
        description:1.云课堂学生端-获取学生同伴互评的课程与项目
        :param url:
        :param headers:
        :param params:
        :param paramspath
        :return:
        '''
        url = url + f"/teachingApi/v1/student/{paramspath}/peerreview/courseandproject"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def get_inclassorinappoinment(cls, url: str, headers=headers_wechat, params=None, paramspath=None):
        '''
        summary:获取学生同伴互评的课程与项目
        description:1.小程序学生端-同伴互评使用
        :param url:
        :param headers:
        :param params:
        :param paramspath
        :return:
        '''
        url = url + f"/teachingApi/v1/student/{paramspath}/inclassorinappoinment"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def get_evaluationstatistics(cls, url: str, headers=headers_web, params=None):
        '''
        summary:获取学生端同伴互评评价统计详情
        description:云课堂学生端-查看同伴互评详情使用
        :param url:
        :param headers:
        :param params:
        :return:
        '''
        url = url + "/teachingApi/v1/student/peerreview/evaluation/statistics"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def get_peerreviewscore(cls, url: str, headers=headers_web, params=None):
        '''
        summary:老师端获取实验项目排行TOP5
        description:云课堂老师端-过程性评价实验项目排行使用
        :param url:
        :param headers:
        :param params:
        :return:
        '''
        url = url + "/teachingApi/v1/project/peerreview/score"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def get_pro_expection(cls, url: str, headers=headers_web, params=None):
        '''
        summary:老师端获取异常实验项目统计
        description:云课堂老师端-过程性评价异常项目统计使用
        :param url:
        :param headers:
        :param params:
        :return:
        '''
        url = url + "/teachingApi/v1/project/expection"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def get_peerreviewparticipant(cls, url: str, headers=headers_web, params=None,paramspath=None):
        '''
        summary:获取同伴互评参与人列表
        description:1.云课堂学生端-获取同伴互评参与人列表
        :param url:
        :param headers:
        :param paramspath
        :param params:
        :return:
        '''
        url = url + f"/teachingApi/v1/peerreview/{paramspath}/participant"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def get_peerreviewid(cls, url: str, headers=headers_wechat, params=None, paramspath=None):
        '''
        summary:获取同伴互评详情
        description:1.小程序学生端-获取同伴互评详情
        :param url:
        :param headers:
        :param paramspath
        :param params:
        :return:
        '''
        url = url + f"/teachingApi/v1/peerreview/{paramspath}"
        r = requests.get(url=url, params=params, headers=headers)
        return r

    @classmethod
    def get_participantid(cls, url: str, headers=headers_web, params=None, paramspath=None):
        '''
        summary:获取同伴互评参与人列表
        description:1.云课堂学生端-获取同伴互评参与人列表
        :param url:
        :param headers:
        :param paramspath
        :param params:
        :return:
        '''
        url = url + f"/teachingApi/v1/peerreview/participant/{paramspath}"
        r = requests.get(url=url, params=params, headers=headers)
        return r